#include "SMPPSarSegmentSeqnum.hpp"

using namespace smpp::pdu;

SarSegmentSeqnum::SarSegmentSeqnum(const quint8 nValue):
TLV(TLVtags::TAG_SAR_SEGMENT_SEQNUM,1),_Value(nValue){}

SarSegmentSeqnum::SarSegmentSeqnum(
const SarSegmentSeqnum &nSarSegmentSeqnum):
TLV(nSarSegmentSeqnum),_Value(nSarSegmentSeqnum.getValue()){}

bool SarSegmentSeqnum::operator ==(
	const SarSegmentSeqnum &nSarSegmentSeqnum) const{
	return (TLV::operator == (nSarSegmentSeqnum) && 
			_Value == nSarSegmentSeqnum.getValue());
}

bool SarSegmentSeqnum::operator !=(
	const SarSegmentSeqnum &nSarSegmentSeqnum) const{
	return !this->operator == (nSarSegmentSeqnum);
}

SarSegmentSeqnum &SarSegmentSeqnum::operator = (
	const SarSegmentSeqnum &nSarSegmentSeqnum){
	if(*this == nSarSegmentSeqnum)
		return *this;
	TLV::operator = (nSarSegmentSeqnum);
	_Value = nSarSegmentSeqnum.getValue();
	return *this;
}

void SarSegmentSeqnum::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 SarSegmentSeqnum::getValue() const{
	return _Value;
}
